<template>
    <section class="home-resume">
        <div class="my-info">
            <div class="my-phone">{{myPhone}}</div>
            <div class="last-login">最近登陆：{{lastLogin}}</div>
        </div>
        <v-touch class="my-setting" @tap="handleGoSetting">
            <svg-icon icon-class="icon-shezhi1"></svg-icon>
        </v-touch>
    </section>
</template>

<script>
import Auth from 'src/api/auth';
import SvgIcon from 'src/components/SvgIcon';
import moment from 'moment';

export default {
    components: { SvgIcon },
    data() {
        return {
        };
    },
    computed: {
        myPhone() {
            return Auth.getUserInfo().phone;
        },
        lastLogin() {
            return moment().format('YYYY-MM-DD hh:mm:ss');
        }
    },
    methods: {
        handleGoSetting() {
            this.$router.push('/settings/my');
        }
    }
};
</script>

<style lang="scss" scoped>
    .home-resume {
        box-sizing: border-box;
        padding: 0 0.6rem 0 0.6rem;
        height:2.3rem;
        background: #0076FF;
        color: white;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .my-phone {
            font-size: 0.4rem;
        }
        .last-login {
            color:#CBE2FF;
            font-size: 0.24rem;
        }
        .my-setting .svg-icon-c.svg-icon{
            width: 0.48rem;
            height: 0.48rem;
        }
    }
</style>